#include "threadPool.h"
//随机生成盐值
int randomSaltValue(char *salt)
{   
    //存储盐值
    salt[0] = '$';
    salt[1] = '6';
    salt[2] = '$';
    //先创建一个数组包含大小写字母、数字、.和/
    char random_char[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
    //生成一个随机数
    srand((unsigned int)(time(NULL)));
    //填充剩下的16位
    for(int i = 3; i < 19; ++i)
    {
        int randIdx = rand() % 64;
        salt[i] = random_char[randIdx];
    }
    salt[19] = '$';
    salt[20] = '\0';

    //printf("salt = %s\n", salt);
    return 0;
}
